package com.wicket.okrapp.integration.dto;

import com.wicket.okrapp.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Objects;

import lombok.Data;

/**
 * @desc CheckEvaObjTargetCycleOsetDto
 * @使用场景
 */
@Data
public class CheckEvaObjTargetCycleOsetDto
  extends BaseDto
  implements Serializable {

  /**
   * 被评对象目标周期ID
   */
  @ApiModelProperty("被评对象目标周期ID")
  private String evaObjTargetCycleId;

  /**
   * 关联目标内容ID
   */
  @ApiModelProperty("关联目标内容ID")
  private String targetCycleContentId;

  /**
   * 周期ID
   */
  @ApiModelProperty("周期ID")
  private String cycleId;

  /**
   * 是否父周期 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否父周期")
  private String isParentCycle;

  /**
   * 是否子周期 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否子周期")
  private String isSubCycle;

  /**
   * 是否中期 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否中期")
  private String isMetaphase;

  /**
   * 起始值
   */
  @ApiModelProperty("起始值")
  private Double targetStartValue;

  /**
   * 目标值
   */
  @ApiModelProperty("目标值")
  private Double targetValue;

  /**
   * 诊断值
   */
  @ApiModelProperty("诊断值")
  private Double targetDiagnosticValue;

  /**
   * 冗余单位
   */
  @ApiModelProperty("冗余单位")
  private String unit;

  /**
   * 冗余指标业务类型 NUMBER_GROWTH:数量增长型 NUMBER_DECLINE:数量降幅型 PERCENTAGE_GROWTH:百分比增长型 PERCENTAGE_DECLINE:百分比降幅型 PROGRESS:进度型 RATIO_GROWTH:比率增长型 RATIO_DECLINE:比率降幅型 SUBJECTIVE_QUALITATIVE:主观定性
   */
  @ApiModelProperty("冗余指标业务类型")
  private String targetValueType;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    CheckEvaObjTargetCycleOsetDto that = (CheckEvaObjTargetCycleOsetDto) o;
    return (
      evaObjTargetCycleId == that.evaObjTargetCycleId &&
      targetCycleContentId == that.targetCycleContentId &&
      cycleId == that.cycleId &&
      isParentCycle == that.isParentCycle &&
      isSubCycle == that.isSubCycle &&
      isMetaphase == that.isMetaphase &&
      targetStartValue == that.targetStartValue &&
      targetValue == that.targetValue &&
      targetDiagnosticValue == that.targetDiagnosticValue &&
      unit == that.unit &&
      targetValueType == that.targetValueType
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      super.hashCode(),
      evaObjTargetCycleId,
      targetCycleContentId,
      cycleId,
      isParentCycle,
      isSubCycle,
      isMetaphase,
      targetStartValue,
      targetValue,
      targetDiagnosticValue,
      unit,
      targetValueType
    );
  }

}
